//package com.families.Interceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
//
//import com.families.entity.ipBlack;
//import com.families.service.LoginService;
//import com.families.util.iputil;
//
//@Component
//public class JwtFilter extends HandlerInterceptorAdapter{
//    
//    @Autowired
//	LoginService userServiceInterface;
//    
//	@Override
//    public boolean preHandle(HttpServletRequest request,HttpServletResponse response,Object handler) throws Exception  {
//   
//		//System.out.println("进入拦截器");
//		String ip=iputil.getLocalIp(request);
//	     System.out.println(ip);
//		ipBlack ipblack=userServiceInterface.getbyip(ip);
//		if(null!=ipblack) {
//			
//			response.sendRedirect("/black.jsp");
//			return false;
//		}
//		return true;
//    	
//    }
//}
